home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / RIncludes / OSUtils.r < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.5 KB  |  122 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OSUtils.r
  3.  
  4.      Contains:    OS Utilities Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17.  
  18. #ifndef __OSUTILS_R__
  19. #define __OSUTILS_R__
  20.  
  21. #ifndef __CONDITIONALMACROS_R__
  22. #include "ConditionalMacros.r"
  23. #endif
  24.  
  25.  
  26. /* The following are from the SysTypes.r file and don't have a good home yet */
  27.  
  28.  
  29. /*-----------------------accl • Mouse Acceleration Tables ------------------------------*/
  30. type 'accl' {
  31.     literal longint                        /* Device identifier or device class */
  32.         classAbsolute,                    /* A flat-response device */
  33.         classMouse,                        /* Mechanical or optical mouse */
  34.         classTrackball,                    /* Trackball */
  35.         classScratchPad,                /* e. g. Midas */
  36.         classJoystick,                    /* e. g. HomeRow */
  37.         classRelTablet;                    /* Relative tablet */
  38.  
  39.     integer = $$CountOf(AcclTable);        /* Number of tables for this device */
  40.     array AcclTable {                    /* Entries sorted by first value; must have at least 0.0 and 1.0 tables */
  41.         unsigned hex longint;            /* Acceleration provided by this table (Fixed) */
  42.  
  43.         integer = $$CountOf(AcclPoint);    /* Number of control points for this device */
  44.         wide array AcclPoint {            /* Entries sorted by first value; implicit first entry (0.0, 0.0); at least one more entry required */
  45.             unsigned hex longint;        /* Device speed (inches per second) (Fixed) */
  46.             unsigned hex longint;        /* Cursor speed (inches per second) (Fixed) */
  47.         };
  48.     };
  49. };
  50.  
  51. /*----------------------------mcky • Mouse Tracking-------------------------------------*/
  52. type 'mcky' {
  53.         array [8] {
  54.             unsigned byte;
  55.         };
  56. };
  57. /*----------------------------KCAP • Physical Layout of Keyboard------------------------*/
  58. type 'KCAP' {
  59.         rect;                                                    /* boundsRect            */
  60.         rect;                                                    /* textRect                */
  61.         integer = $$CountOf(MainArray);
  62.         array MainArray {
  63.             integer = $$CountOf(ShapeArray) - 1;
  64.             wide array ShapeArray {
  65.                 point;                                            /* shapePoint            */
  66.             };
  67.             integer = $$CountOf(KeyArray) - 1;
  68.             wide array KeyArray {
  69.                 byte;                                            /* mask                    */
  70.                 boolean                or, and;
  71.                 bitstring[7];                                    /* keyCode                */
  72.                 integer;                                        /* dv                    */
  73.                 integer;                                        /* dh                    */
  74.             };
  75.         };
  76. };
  77. /*----------------------------KCHR • ASCII Mapping (software)---------------------------*/
  78. type 'KCHR' {
  79.         integer;                                                /* Version                */
  80.         wide array [$100] {                                        /* Indexes                */
  81.             byte;
  82.         };
  83.         integer = $$CountOf(TableArray);
  84.         array TableArray {
  85.             wide array [$80] {                                    /* ASCII characters        */
  86.                 char;
  87.             };
  88.         };
  89.         integer = $$CountOf(DeadArray);
  90.         array DeadArray {
  91.             byte;                                                /* Table number            */
  92.             byte;                                                /* Virtual keycode        */
  93.             integer = $$CountOf(CompletorArray);
  94.             wide array CompletorArray {
  95.                 char;                                            /* Completor char        */
  96.                 char;                                            /* Substituting char    */
  97.             };
  98.             char;                                                /* No match char        */
  99.             char;                                                /* 16-bits for the times
  100.                                                                    when 8 isn't enough    */
  101.         };
  102. };
  103. /*----------------------------KMAP • Keyboard Mapping (hardware)------------------------*/
  104. type 'KMAP' {
  105.         integer;                                                /* ID                    */
  106.         integer;                                                /* Version                */
  107.         wide array [$80] {                                        /* Raw to virtual        */
  108.             byte;                                                /*  keycode map            */
  109.         };
  110.         integer = $$CountOf(ExceptionArray);
  111.         wide array ExceptionArray {
  112.             byte;                                                /* Raw keycode            */
  113.             boolean            noXor, Xor;
  114.             fill bit[3];
  115.             bitstring[4];                                        /* ADB op                */
  116.             pstring;
  117.         };
  118. };
  119.  
  120. #endif /* __OSUTILS_R__ */
  121.  
  122.